package club.kingyin.commons.entity.user;

import club.kingyin.commons.enums.BlogEnum;
import club.kingyin.easytoken.annotation.Token;
import club.kingyin.easytoken.annotation.TokenIgnore;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;

/**
 * (User)表实体类
 *
 * @author makejava
 * @since 2022-01-20 15:04:02
 */
@Data
@SuppressWarnings("serial")
public class User extends Model<User> {
    //ID
    @Token
    private Integer id;
    //第三方登录代码
    private String unicode;
    //昵称
    private String nickname;
    //状态
    private BlogEnum status;
    //头像地址
    private String avater;
    //邮箱
    @Token
    private String username;
    //性别
    private BlogEnum sex;
    //密码
    private String password;
    //简介
    private String slogan;
    // 封号
    private Long titled;
    //角色
    @Token
    private BlogEnum role;
    @TableLogic
    private BlogEnum deleted;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
    }

